﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.IO;
using System.Xml;
using System.Configuration;
using Enter.Mvc.Base.Service;
using Enter.Mvc.Base.Model;

namespace MyChy.Mvc.Base.Service
{
	public class UnityBaseService : IUnityBaseService
	{
		private static string SectionName = "WebMvcBase";
		public UnityBase GetBase()
		{
			return GeBaseWebSettings();
		}


		#region 私有方法

		/// <summary>
		/// 读取使用哪个缓存环境 微软 mem
		/// </summary>
		/// <returns></returns>
		private UnityBase GeBaseWebSettings()
		{
			UnityBase setting = null;
			try
			{
				setting = ConfigurationManager.GetSection(SectionName) as UnityBase;
			}
			catch { setting = new UnityBase(); }
			if (setting == null)
			{
				setting = new UnityBase();
			}
			return setting;

		}


		#endregion
	}
}
